<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <script src="../common/js/jquery.min.js"></script>
    <script src="../common/js/angular.min.js"></script>
    <script src="../common/js/angular-ui-router.min.js"></script>
    <script src="../common/js/bootstrap.min.js"></script>
    <!--<link rel="stylesheet" href="../common/animate-141106223642/style.css"/>-->
    <link rel="stylesheet" href="../common/animate.min.css"/>
    <link rel="stylesheet" href="../common/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="../css/live.css"/>
    <title>图片直播</title>
</head>
<body ng-app="myApp" ng-controller="Ctrl">
        <div id="live-header">
            <h2>闪传2.0重磅来袭</h2>
            <div id="live-header-main">
                <span class="left"></span>
                <span class="center"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;技术创新&nbsp;大幅降低价格 &nbsp;功能升级&nbsp; 带来全新体验 </span>
                <span class="right"></span>
            </div>
            <a href="livethree"><button>了解详情</button></a>
        </div>
    <div id="live-p">
        图片直播展示
    </div>
    <div id="live-main">
        <div class="live-main-left" ng-repeat="i in arr" style="background: url('{{i.bg}}') 0 0 / 50% 100%">
           <div class="ewm">
               <img src="{{i.img}}" alt=""/>
               <p>访问本活动微信相册</p>
           </div>
            <a href="livetwoH" ng-click="click(i)"></a>
            <div class="live-main-right">
                <h3>{{i.p1}}</h3>
                <p>{{i.p2}}</p>
                <p>{{i.p3}}</p>
                <div class="wrap">
                    <div class="big">
                        <div class="txt">{{i.p4}}</div>
                        <div class="imgs">
                            <img ng-repeat="b in i.imgs" src="{{b}}" alt=""/>
                        </div>
                    </div>
                </div>
                <div class="live-foot">
                    <span class="iconfont icon-cover">{{i.num}}</span><span class="iiconfont icon-read">{{i.look}}</span>
                    <button ng-click="click(i)">查看照片</button>
                </div>
            </div>
        </div>
    </div>
</body>
<script>
    angular.module('myApp',[])
            .controller('Ctrl',['$scope','$http',function ($scope,$http) {
                $http.get("liveJson").then(function(data){
                    $scope.arr = data.data.data;
                    console.log($scope.arr);
                    $scope.click = function(i){
                        console.log(i.id);
                        localStorage.setItem('name', i.id);
                        localStorage.setItem('p1', i.p1);
                        localStorage.setItem('p4', i.p4);
                        localStorage.setItem('img', i.img);
                    }
                })
            }])
</script>
</html>